<link rel="stylesheet" href="templates/authority/zzgl/css/authority.css" />
<link rel="stylesheet" href="templates/authority/common/css/zTreeStyle.css" />
<link rel="stylesheet" href="templates/authority/common/css/cropper.css" />
<div class="pd14 vany_authority">
	<div class="vany_treeTable pd14" id="authority">
		<!--面包屑-->
		<div class="pb10" id="crumbs">
			<el-breadcrumb separator="/">
				<el-breadcrumb-item :to="{ path: '/' }">组织权限</el-breadcrumb-item>
				<el-breadcrumb-item>组织管理</el-breadcrumb-item>
			</el-breadcrumb>
		</div>
		<div id="treeTable" class="treeTable">
			<!--树-->
			<div class="item i1 vany_tree" id="move_left">
				<div class="relative">
					<!--树的搜索功能-->
					<div class="pd14">
						<div class="search-bar">
							<input type="text" id="key" value="" class="empty" placeholder="请输入机构名称" />
							<i class="el-input__icon el-icon-search"></i>
						</div>
					</div>
					<div class="treeTitle" id="treeTitle">
						<i class="iconfont">&#xe797;</i>组织列表
						<div class="floatR"><i class="iconfont icon-jia addRole" @click="titleOperation"></i></div>
						<div class="chooseShow" id="titleOperation">
							<ul>
								<li authority="base_org_addRoot">
									<el-button type="text" @click="addTitle">添加根结点</el-button>
								</li>
								<li authority="base_org_import">
									<el-button type="text" @click="ImportOrganization">导入组织</el-button>
								</li>
							</ul>
						</div>
					</div>
					<ul id="treeDemo" class="ztree"></ul>
					<div class="moveline"></div>
				</div>
			</div>
			<!--表格-->
			<div class="item i2" id="table">
				<div class="pd14">
					<el-row :gutter="8">
						<el-col :span="12">
							<el-row :gutter="8">
								<el-col :span="12">
									<el-input v-model="searchValue" @change="restoreTableData" @keyup.enter.native="searchTable" :on-icon-click="searchTable" placeholder="请输入您要搜索的内容" icon="search">
									</el-input>
								</el-col>
								<el-col :span="12">
									<el-dropdown @command="filterStatus">
										<el-button type="primary">
											{{curFilter}}<i class="el-icon-caret-bottom el-icon--right"></i>
										</el-button>
										<el-dropdown-menu slot="dropdown">
											<el-dropdown-item v-for="item in filtersStatusCount" :command="item.value">{{item.text}}</el-dropdown-item>
										</el-dropdown-menu>
									</el-dropdown>
									<!-- 
									<span style="font-size: 14px;">每页{{pageSize}}条</span>
									<span style="font-size: 14px;">{{pageIndex-1}}/{{pages}}</span>
									 -->
								</el-col>
							</el-row>
						</el-col>
						<el-col :span="12">
							<el-row type="flex" class="row-bg qxBtn" justify="end">
								<el-button type="primary" @click="AddTable" authority="base_user_add">新增人员</el-button>
								<el-button type="primary" @click="BatchImport" authority="base_user_import">批量导入</el-button>
								<el-button type="primary" @click="userExport" class="ml10" authority="base_user_export">批量导出</el-button>
							</el-row>
						</el-col>
					</el-row>
				</div>

				<el-table ref="table" :data="tableData" v-loading="listLoading" @selection-change="selsChange" highlight-current-row style="width: 100%;" :height="tableHeight" @row-click="showPersonCard">
					<el-table-column type="selection"> </el-table-column>
					<el-table-column prop="userAccount" show-overflow-tooltip label="账号" width="90">
					</el-table-column>
					<el-table-column prop="userName" show-overflow-tooltip label="姓名" width="130">
						<template scope="scope">
							<img :src="scope.row.photoUrl" onerror="nofindImg(this);" /> {{ scope.row.userName }}
						</template>
					</el-table-column>
					<el-table-column prop="gender" label="性别" width="80">
						<template scope="scope">
							<div v-if="scope.row.gender === '1'">
								男
							</div>
							<div v-else-if="scope.row.gender === '0'">
								女
							</div>
							<div v-else>
								其他
							</div>
						</template>
					</el-table-column>
					<el-table-column prop="dept" show-overflow-tooltip label="部门" width="240">
					</el-table-column>
					<el-table-column prop="mobile" show-overflow-tooltip label="手机号">
					</el-table-column>
					<el-table-column prop="email" show-overflow-tooltip label="邮箱">
					</el-table-column>
					<!-- <el-table-column column-key="status" prop="State" show-overflow-tooltip label="状态" :filters="filters" :filter-multiple="false" :filter-method="filterTag" filter-placement="bottom-end"> -->
					<el-table-column column-key="status" prop="State" show-overflow-tooltip label="状态">
						<template scope="scope">
							<div v-if="scope.row.status === '1'">
								启用
							</div>
							<div v-else>
								<div style="color:#ff0000;">禁用</div>
							</div>
						</template>
					</el-table-column>
				</el-table>
				
				   <el-pagination
                             @size-change="handleSizeChange"
                             @current-change="handleCurrentChange"
                             :current-page="pageIndex"
                             :page-sizes="[10, 20, 30]"
                             :page-size="pageSize"
                             layout="total, sizes, prev, pager, next, jumper"
                             :total="total">
                     </el-pagination>
                     
			</div>
			<!--个人资料卡片-->
			<div id="personCard">
				<el-dialog top="top" @close="canleSelect" title="个人资料" v-model="personCardVisible" size="tiny" custom-class="right_dialog">
					<div class="person_innfo">
						<div class="person_innfo_header">
							<img width="80" height="80" :src="personinfo.photoUrl" alt="" @error="nofindImg($event)" />
							<div class="person_innfo_detail">
								<p class="name" v-text="personinfo.userName"></p>
								<p class="gender">性别：<span v-text="genderStr"></span></p>
								<p class="state">
									<el-tag type="gray" v-text="statusStr"></el-tag>
								</p>
								<p class="edit qxBtn">
									<el-button type="primary" @click="EditPerson" authority="base_user_update">编辑</el-button>
								</p>
							</div>
						</div>
						<div class="person_innfo_content">
							<div class="person_innfo_item" v-for="item in items">
								<p class="person_innfo_label" v-text="item.name"></p>
								<p v-if="item.iscategory" class="person_innfo_text">
									<el-tag v-for="value in item.value" class="vany-tag" :class="item.tagClass">
										<i class="icon iconfont tag-icon" :class="item.icon"></i>
										<span v-text="value" class="tag-name"></span>
									</el-tag>
								</p>
								<p v-else class="person_innfo_text" v-text="item.value"></p>
							</div>
						</div>
					</div>
					<span slot="footer" class="dialog-footer qxBtn">
    					<el-button type="primary" @click="resetPassword" authority="base_user_resetUserPassword">重置密码</el-button>
    					<el-button type="primary" @click="disabledOrEnablePerson" authority="base_user_resetUserStatus" v-text="StateButtonText"></el-button>
    					<el-button type="primary" @click="movePerson" authority="base_user_moveUsers">移动</el-button>
    					<el-button type="danger" @click="deletePerson" authority="base_user_deleteUsers">删除</el-button>
  					</span>
				</el-dialog>
			</div>
			<!--重置密码-->
			<div id="resetPassword">
				<el-dialog title="重置密码" v-model="resetPasswordVisible" :close-on-click-modal="false" size="small" @close="resetData" custom-class="border_dialog title_dialog">
					<div v-if="restSucceed" class="reest_succeed">
						<div class="reset_message">
							<i class="el-icon-circle-check"></i>
							<div>
								<h1>用户密码重置成功</h1>
								<p id="newpassword">新密码：<span v-text="userPassword"></span></p>
							</div>
						</div>
						<p>通过【口头/邮件/短信】通知到该用户</p>
					</div>
					<div v-else>
						<el-form :rules="rules" label-position="left" :model="form" ref="form">
							<el-form-item label="管理员密码:" :label-width="formLabelWidth" prop="adminpassword">
								<el-input id="test___" autofocus type="password" @keyup.enter.native="submitResetPassword('form', $event)" v-model="form.adminpassword" placeholder="请输入管理员密码"></el-input>
							</el-form-item>
						</el-form>
					</div>
					<div v-if="!restSucceed" slot="footer" class="dialog-footer">
						<el-button class="loading" type="primary" @click="submitResetPassword('form', $event)">重置密码</el-button>
					</div>
				</el-dialog>
			</div>
			<!--批量选择-->
			<div id="multiSelectPerson" v-bind:class="{isIE: isIE}">
				<el-dialog top="top" ref="dialog" :modal="false" v-model="multiSelectPersonVisible" size="tiny" custom-class="right_dialog title_dialog" @close="removeFromSeleted">
					<span slot="title" class="el-dialog__title" v-text="title"></span>
					<div class="seleted_persons">
						<div class="seleted_person" v-for="(seletedPerson, rowindex) in seletedPersons">
							<img :src="seletedPerson.photoUrl" width="60" height="60" onerror="nofindImg(this);" />
							<p v-text="seletedPerson.userName"></p>
							<span class="remove_from_seleted" @click="removeFromSeleted(rowindex)">╳</span>
						</div>
					</div>
					<span slot="footer" class="dialog-footer qxBtn">
    					<el-button type="primary" @click="moveSeletedPerson" authority="base_user_moveUsers">移动</el-button>
    					<el-button type="danger" @click="deleteSeletedPerson" authority="base_user_deleteUsers">删除</el-button>
  					</span>
				</el-dialog>
			</div>
			<!--批量导入-->
			<div id="BatchImport" class="BatchImport">
				<el-dialog :close-on-click-modal="false" :auto-upload="false" v-model="batchImportVisible" title="批量导入" size="small" custom-class="border_dialog title_dialog ImportExcel">
					<el-form :label-position="labelPosition" :model="ruleForm" ref="ruleForm">
						<el-form-item label="">
							<div class="vanyfilter hastag" v-if="ruleForm.orgList" @click="openOrgFilter">
								<el-tag v-for="tag in orgList" :key="tag.id">{{tag.name}}</el-tag>
							</div>
							<div class="vanyfilter" v-else @click="openOrgFilter">
								请选择要导入到的部门
							</div>
							<el-input v-model="ruleForm.batch" hidden></el-input>
							<div class="sub-title">请按照我们提供的标准模板填写信息
								<a href="/templates/excelTemplate/userImportTemplate.xlsx">下载标准模板</a>
							</div>
						</el-form-item>
						<el-upload ref="upload" :show-file-list="false" :auto-upload="false" drag :on-change="handleChange" :on-success="handleSuccess" action="/base/user/import" :data="form">
							<div class="user_import" v-if="filename">
								<i class="excel iconfont icon-excel"></i>
								<div class="el-upload__text" v-text="filename"></div>
							</div>
							<div class="user_import" v-else>
								<i class="iconfont icon-jia"></i>
								<div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
							</div>
							<div class="el-upload__tip" slot="tip">支持Excel格式</div>
						</el-upload>
						<el-form-item>
							<el-radio-group v-model="ruleForm.state" >
								<el-radio :label="1">成员信息相同时，覆盖原有信息</el-radio>
								<el-radio :label="0">成员信息相同时，忽略原有信息</el-radio>
							</el-radio-group>
						</el-form-item>
					</el-form>
					<div slot="footer" class="dialog-footer">
						<el-button type="primary" @click="submitForm('ruleForm')">确 定</el-button>
						<el-button class="el-button--ddd" @click="batchImportVisible = false">取消</el-button>
					</div>
				</el-dialog>
			</div>
			<!--导入组织-->
			<div id="ImportOrg" class="BatchImport">
				<el-dialog :close-on-click-modal="false" :auto-upload="false" v-model="OrgImportVisible" title="批量导入" size="small" custom-class="border_dialog title_dialog ImportExcel">
					<el-form :label-position="labelPosition" :model="ruleForm" ref="ruleForm">
						<div class="sub-title">请按照我们提供的标准模板填写信息
							<a href="/templates/excelTemplate/orgImportTemplate.xlsx">下载标准模板</a>
						</div>
						<!--action	必选参数, 上传的地址-->
						<el-upload ref="upload" :show-file-list="false" :auto-upload="false" with-credentials drag :on-change="handleChange" :on-success="handleAvatarSuccess" action="/base/org/import" :data="token">
							<div class="user_import" v-if="filename">
								<i class="excel iconfont icon-excel"></i>
								<div class="el-upload__text" v-text="filename"></div>
							</div>
							<div class="user_import" v-else>
								<i class="iconfont icon-jia"></i>
								<div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
							</div>
							<div class="el-upload__tip" slot="tip">支持Excel格式</div>
						</el-upload>
						<!--<el-form-item>
							<el-radio-group v-model="ruleForm.state">
								<el-radio :label="1">成员信息相同时，覆盖原有信息</el-radio>
								<el-radio :label="0">成员信息相同时，忽略原有信息</el-radio>
							</el-radio-group>
						</el-form-item>-->
					</el-form>
					<div slot="footer" class="dialog-footer">
						<el-button type="primary" @click="submitForm('ruleForm')">确 定</el-button>
						<el-button class="el-button--ddd" @click="OrgImportVisible = false">取消</el-button>
					</div>
				</el-dialog>
			</div>
			<!--新增人员-->
			<div id="newPerson">
				<el-dialog :title="title" v-model="newPersonVisible" size="small" top="" :close-on-click-modal="false" custom-class="center_dialog title_dialog" @close="close">
					<el-form ref="newPersonForm" :rules="rules" :model="form" :label-position="labelPosition" label-width="100px">
						<el-row :gutter="20">
							<el-col :span="12">
								<el-form-item label="名称" prop="userName" required>
									<el-input v-model="form.userName" placeholder="请输入姓名"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="头像">
									<el-upload :auto-upload="false" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg" class="avatar-uploader" action="" :show-file-list="false" :on-change="handleChange">
										<img :src="photoUrl" class="avatar" id="avater_preview" onerror="nofindImg(this);">
										<p>修改头像</p>
									</el-upload>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row :gutter="20">
							<el-col :span="12">
								<el-form-item label="账号" prop="userAccount" required>
									<el-input :disabled="!isAdd" v-model="form.userAccount" placeholder="请输入账号"></el-input>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row :gutter="20">
							<el-col :span="12">
								<el-form-item label="公司电话" prop="tel">
									<el-input v-model="form.tel" placeholder="请输入电话号码"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="性别" prop="gender">
									<el-radio-group v-model="form.gender">
										<el-radio label="1">男</el-radio>
										<el-radio label="0">女</el-radio>
									</el-radio-group>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row :gutter="20">
							<el-col :span="12">
								<el-form-item label="手机号" prop="mobile">
									<el-input v-model="form.mobile" placeholder="请输入手机号"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="状态" prop="status">
									<el-radio-group v-model="form.status">
										<el-radio label="1">启用</el-radio>
										<el-radio label="0">禁用</el-radio>
									</el-radio-group>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row :gutter="20">
							<el-col :span="12">
								<el-form-item label="证件类型" prop="identificationTypeCode">
									<el-select v-model="form.identificationTypeCode" placeholder="-- -- 请选择 -- --">
										<el-option v-for="item in identificationTypeCode" :key="item.value" :label="item.label" :value="item.value"></el-option>
									</el-select>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="证件号码" prop="identificationNo">
									<el-input v-model="form.identificationNo" placeholder="请输入证件号码"></el-input>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row :gutter="20">
							<el-col :span="12">
								<el-form-item label="邮箱" prop="email">
									<el-input v-model="form.email" placeholder="请输入邮箱号"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="12">
								<el-form-item label="sesaID" prop="wechat">
									<el-input v-model="form.wechat" placeholder="请输入SesaID"></el-input>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row :gutter="20">
							<el-col :span="24">
								<el-form-item label="所在部门" required prop="orgList">
									<div class="vanyfilter hastag" v-if="form.orgList" @click="oepnOrgFilter">
										<el-tag class="vany-tag zuzhi-tag" v-for="tag in orgList" :key="tag.id">
											<i class="icon iconfont tag-icon icon-zuzhi"></i>
											<span v-text="tag.name" class="tag-name"></span>
										</el-tag>
									</div>
									<div class="vanyfilter" v-else @click="oepnOrgFilter">
										请选择所在部门
									</div>
									<el-input v-model="form.orgList" hidden></el-input>
								</el-form-item>
							</el-col>
						</el-row>
						 <el-row :gutter="20"> 
						 	   <el-col :span="24"> 
									<el-form-item label="所在工厂" prop="jobPosition"> 
										<el-select v-model="form.jobPosition" placeholder="-- -- 请选择 -- --">
											<el-option v-for="item in jobPosition" :key="item.value" :label="item.label" :value="item.value"></el-option> 
										</el-select> 
									</el-form-item> 
								</el-col> 
						</el-row>
						 <div style="display: none">
						<el-row :gutter="20">
							<el-col :span="24">
								<el-form-item label="所在群组" prop="teamList">
									<div class="vanyfilter hastag" v-if="form.teamList" @click="openTeamFilter">
										<el-tag class="vany-tag qunzu-tag" v-for="tag in teamList" :key="tag.id">
											<i class="icon iconfont tag-icon icon-qunzu"></i>
											<span v-text="tag.name" class="tag-name"></span>
										</el-tag>
									</div>
									<div class="vanyfilter" v-else @click="openTeamFilter">
										请选择所在群组
									</div>
									<el-input v-model="form.teamList" hidden></el-input>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row :gutter="20">
							<el-col :span="24">
								<el-form-item label="所属分类" prop="tagList">
									<div class="vanyfilter hastag" v-if="form.tagList" @click="openTagFilter">
										<el-tag class="vany-tag fenlei-tag" v-for="tag in tagList" :key="tag.id">
											<i class="icon iconfont tag-icon icon-fenlei"></i>
											<span v-text="tag.name" class="tag-name"></span>
										</el-tag>
									</div>
									<div class="vanyfilter" v-else @click="openTagFilter">
										请选择所属分类
									</div>
									<el-input v-model="form.tagList" hidden></el-input>
								</el-form-item>
							</el-col>
						</el-row>
						</div>
						<el-row :gutter="20">
							<el-col :span="24">
								<el-form-item label="所属角色" prop="roleList">
									<div class="vanyfilter hastag" v-if="form.roleList" @click="openRoleFilter">
										<el-tag class="vany-tag jiaose-tag" v-for="tag in roleList" :key="tag.id">
											<i class="icon iconfont tag-icon icon-jiaose"></i>
											<span v-text="tag.name" class="tag-name"></span>
										</el-tag>
									</div>
									<div class="vanyfilter" v-else @click="openRoleFilter">
										请选择所属角色
									</div>
									<el-input v-model="form.roleList" hidden></el-input>
								</el-form-item>
							</el-col>
						</el-row>
					</el-form>
					<span slot="footer" class="dialog-footer">
    					<el-button v-if="isAdd" @click="save('add')">保存并继续添加</el-button>
    					<el-button class="el-button--ddd" @click="save" type="primary">保存</el-button>
  					</span>
				</el-dialog>
			</div>
			<!--头像裁剪框-->
			<div id="avaterCropper">
				<el-dialog title="裁剪头像" :visible="dialogVisible" :close-on-click-modal="false" custom-class="border_dialog title_dialog" size="tiny">
					<div>
						<img id="avater_be_cropper" :src="imgSrc" style="max-width: 100%;">
					</div>
					<span slot="footer" class="dialog-footer">
						<el-button type="primary" @click="updateAvater(true)">确 定</el-button>
				    	<el-button class="el-button--ddd"  @click="updateAvater(false)">取 消</el-button>
				  	</span>
				</el-dialog>
			</div>
			<!--树的下拉（右键功能，当前节点操作）-->
			<div id="rMenu" class="chooseShow">
				<ul>
					<li id="m_addroot" authority="base_org_updateFotTop">
						<el-button type="text" @click="addroot">升级为根结点</el-button>
					</li>
					<li id="m_add" authority="base_org_add">
						<el-button type="text" @click="add">添加子部门</el-button>
					</li>
					<li id="m_edit" authority="base_org_update">
						<el-button type="text" @click="Edit">修改部门</el-button>
					</li>
					<li id="m_up" onclick="UpTreeNode();" authority="base_org_updateOrderNum">
						<el-button type="text">上移</el-button>
					</li>
					<li id="m_down" onclick="DownTreeNode();" authority="base_org_updateOrderNum">
						<el-button type="text">下移</el-button>
					</li>
					<li id="m_del" authority="base_org_delete">
						<el-button type="text" @click="del">删除</el-button>
					</li>
					<li id="m_daochu" @click="ExportOrganization" authority="base_org_export">
						<el-button type="text">导出组织</el-button>
					</li>
					<li id="m_paixu" @click="PaixuTreeNode" authority="base_user_updateOrderNum">
						<el-button type="text">人员排序</el-button>
					</li>
				</ul>
			</div>
			<!--树的添加子部门-->
			<div id="addRole">
				<el-dialog v-model="treeAddVisible" title="添加部门" size="small" :close-on-click-modal="false" custom-class="border_dialog title_dialog">
					<el-form :label-position="labelPosition" :model="ruleForm" :rules="rules" ref="ruleForm" label-width="140px">
						<el-form-item v-if="!showVisible" label="父层机构名称" required prop="parentName">
							<div class="vanyfilter hastag" v-if="ruleForm.parentName" @click="openParentOrg">
								<el-tag class="vany-tag zuzhi-tag" v-for="tag in parentName" :key="tag.id">
									<i class="icon iconfont tag-icon icon-zuzhi"></i>
									<span v-text="tag.name" class="tag-name"></span>
								</el-tag>
							</div>
							<div class="vanyfilter" v-else @click="openParentOrg">
								请选择所在部门
							</div>
							<el-input v-model="ruleForm.parentName" hidden></el-input>
						</el-form-item>
						<el-form-item label="机构编号" prop="id">
							<el-input v-model="ruleForm.id" placeholder="请输入机构编码"></el-input>
						</el-form-item>
						<el-form-item label="机构名称" prop="name">
							<el-input v-model="ruleForm.name" placeholder="请输入机构名称"></el-input>
						</el-form-item>
						<el-form-item label="机构电话" prop="officeTel">
							<el-input v-model="ruleForm.officeTel" placeholder="请输入机构电话"></el-input>
						</el-form-item>
					</el-form>
					<div slot="footer" class="dialog-footer">
						<el-button type="primary" @click="submitForm('ruleForm')">保存</el-button>
					</div>
				</el-dialog>
			</div>
			<!--树修改-->
			<div id="treeEdit">
				<el-dialog v-model="treeEditVisible" title="修改部门" size="small" :close-on-click-modal="false" custom-class="border_dialog title_dialog">
					<el-form :label-position="labelPosition" :model="ruleForm" :rules="rules" ref="ruleForm" label-width="140px">
						<el-form-item label="父层机构名称" required prop="parentName">
							<div class="vanyfilter hastag" v-if="ruleForm.parentName" @click="openParentOrg">
								<el-tag v-if="showParent" class="vany-tag zuzhi-tag" v-for="tag in parentName" :key="tag.id">
									<i class="icon iconfont tag-icon icon-zuzhi"></i>
									<span v-text="tag.name" class="tag-name"></span>
								</el-tag>
								<div v-else>
									<div class="showFirst" style="display: none;">
										<el-tag class="vany-tag zuzhi-tag" v-for="tag in parentName" :key="tag.id">
											<i class="icon iconfont tag-icon icon-zuzhi"></i>
											<span v-text="tag.name" class="tag-name"></span>
										</el-tag>
									</div>
									<div class="showSed" style="height: 30px;">已经是最顶层</div>
								</div>
							</div>
							<div class="vanyfilter" v-else @click="openParentOrg">
								请选择所在部门
							</div>
							<el-input v-model="ruleForm.parentName" hidden></el-input>
						</el-form-item>

						<el-form-item label="机构编码" prop="id">
							<el-input v-model="ruleForm.id" placeholder="请输入机构编码" :disabled="true"></el-input>
						</el-form-item>
						<el-form-item label="机构名称" prop="name">
							<el-input v-model="ruleForm.name" placeholder="请输入机构名称"></el-input>
						</el-form-item>
						<el-form-item label="机构电话" prop="officeTel">
							<el-input v-model="ruleForm.officeTel" placeholder="请输入机构电话"></el-input>
						</el-form-item>
					</el-form>
					<div slot="footer" class="dialog-footer">
						<el-button type="primary" @click="submitForm('ruleForm')">保存</el-button>
					</div>
				</el-dialog>
			</div>
			<!--树的右键操作：本部门排序-->
			<div id="sortOrgPersons">
				<el-dialog title="本部门排序" v-model="dialogTableVisible" :close-on-click-modal="false" custom-class="border_dialog title_dialog">
					<el-row :gutter="20">
						<el-col :span="18">
							<el-autocomplete :trigger-on-focus="false" popper-class="sortOrgPersons" v-model="matches" :fetch-suggestions="querySearch" custom-item="sortOrgPersons" placeholder="请输入您要搜索的内容" @select="handleSelect" icon="search"></el-autocomplete>
							<el-table ref="orgPersonsTable" highlight-current-row height="500" :data="orgPersons" @row-click="recordSeletedPerson">
								<el-table-column type="index" label="序号" width="100"></el-table-column>
								<el-table-column property="userName" label="姓名"></el-table-column>
								<el-table-column property="jobPosition" label="工厂"></el-table-column>
							</el-table>
						</el-col>
						<el-col :span="6">
							<el-button-group>
								<el-button type="primary" @click="movePersonTo('top')" type="primary"><i class="el-icon-caret-top el-icon--left"></i>置顶</el-button><br /><br />
								<el-button type="primary" @click="movePersonTo('up')"><i class="el-icon-arrow-up el-icon--left"></i>上移</el-button><br /><br />
								<el-button type="primary" @click="movePersonTo('down')"><i class="el-icon-arrow-down el-icon--left"></i>下移</el-button><br /><br />
								<el-button type="primary" @click="movePersonTo('bottom')"><i class="el-icon-caret-bottom el-icon--left"></i>置底</el-button><br /><br />
							</el-button-group>
						</el-col>
					</el-row>

					<div slot="footer" class="dialog-footer">
						<el-button type="primary" class="el-button--ddd" @click="dialogTableVisible = false">关闭</el-button>
						<!-- <el-button type="primary" @click="saveSorted">保存</el-button> -->
					</div>
				</el-dialog>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript" src="templates/authority/common/js/jquery.ztree.all.min.js"></script>
<script type="text/javascript" src="templates/authority/common/js/jquery.ztree.exhide.min.js"></script>
<script type="text/javascript" src="templates/authority/common/js/VanyBaseTree.js?ts=new Date().getTime()"></script>
<script type="text/javascript" src="templates/authority/common/js/VanyEditTree.js?ts=new Date().getTime()"></script>
<script type="text/javascript" src="templates/authority/common/js/cropper.js"></script>
<script type="text/javascript" src="templates/authority/zzgl/js/management.js?ts=new Date().getTime()"></script>
<script type="text/javascript" src="templates/authority/common/js/moveline.js?ts=new Date().getTime()"></script>